package com.suredy.app.porject.constants;

import org.apache.commons.lang3.StringUtils;

/**
 * 合同状态
 * 
 * @author VIVID.G
 * @since 2015-10-15
 * @version v0.1
 */
public enum ContractStatus {

	WAIT("待建"),

	START("在建"),

	FINISH("竣工"),

	COMPLETED("完工"),

	SUSPEND("中止待建"),

	SHUTDOWN("终止");

	private String value;

	private ContractStatus(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public final static ContractStatus getStatusByValue(String value) {
		if (StringUtils.isBlank(value))
			return null;

		for (ContractStatus s : ContractStatus.values()) {
			if (value.equals(s.getValue()))
				return s;
		}

		return null;
	}

}
